package com.henghai.zhenxuan.ui.page.home;

import android.os.Bundle;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.henghai.zhenxuan.BR;
import com.henghai.zhenxuan.R;
import com.hjq.bar.OnTitleBarListener;
import com.hjq.bar.TitleBar;
import com.kunminx.architecture.ui.page.BaseFragment;
import com.kunminx.architecture.ui.page.DataBindingConfig;
import com.kunminx.architecture.ui.page.StateHolder;

public class NoticeDetailFragment extends BaseFragment {
    private NoticeDetailStates mStates;

    @Override
    protected void initViewModel() {
        mStates = getFragmentScopeViewModel(NoticeDetailStates.class);

    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
    }

    @Override
    protected DataBindingConfig getDataBindingConfig() {


        return new DataBindingConfig(com.henghai.zhenxuan.R.layout.fragment_notice_detail, BR.vm, mStates).addBindingParam(BR.listener, new ListenerHandler());

    }


    public class ListenerHandler implements OnTitleBarListener {
        @Override
        public void onLeftClick(TitleBar titleBar) {
            OnTitleBarListener.super.onLeftClick(titleBar);
            nav().navigateUp();
        }

        @Override
        public void onRightClick(TitleBar titleBar) {
            OnTitleBarListener.super.onRightClick(titleBar);
        }
    }

    public static class NoticeDetailStates extends StateHolder {

    }
}
